# Maintainer: Rydia <rydia@member.fsf.org>
pkgname=ibus-table-chinese
pkgver=1.8.3
pkgrel=0
pkgdesc="Next Generation Input Bus for Linux"
url="https://github.com/definite/ibus-table-chinese"
arch="all"
license="LGPL-2.1-or-later"
depends="
	ibus ibus-table
"
makedepends="
	ibus-dev cmake
"
source="
	$pkgname-$pkgver.tar.gz::https://github.com/definite/$pkgname/archive/refs/tags/$pkgver.tar.gz
	cmake-fedora-2.9.2-Source.tar.gz::https://releases.pagure.org/cmake-fedora/cmake-fedora-2.9.2-Source.tar.gz
"

prepare() {
	default_prepare
	rmdir cmake-fedora
	ln -sf ../cmake-fedora-2.9.2-Source cmake-fedora
}

build() {
        if [ "$CBUILD" != "$CHOST" ]; then
                CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
        fi
        cmake -DCMAKE_INSTALL_PREFIX=/usr $CMAKE_CROSSOPTS .
        cmake --build .
}

package() {
        DESTDIR="$pkgdir" cmake --install .
}

sha512sums="
610455343d9c9bf6577c7fd7aef9435c339c2f23c4d5f7ae2cbbc2366a9eb6a8a124e86621387497cc624e3276bf739b55602355ad41c4127f45f6d85cc5b4dc  ibus-table-chinese-1.8.3.tar.gz
187637035c237c76ac53f859f142503437e7e45edcada918aedf76fae38ba1ddf2254ecd4c4ddc55e075f27e1e8fc11acd7fa45d106d4de507fa3ccc82b5c104  cmake-fedora-2.9.2-Source.tar.gz
"
